package com.alkaid.anime.service;

import com.alkaid.commons.entity.AnimeRefresh;
import com.alkaid.commons.entity.AnimeSource;
import com.alkaid.commons.entity.AnimeVideo;
import com.alkaid.commons.ex.AnimeNotFoundException;
import com.alkaid.commons.ex.IllegalException;
import com.alkaid.commons.ex.NotLoginException;
import com.alkaid.commons.ex.VideoNotFoundException;
import com.alkaid.commons.param.anime.AnimePlay;

import java.util.LinkedList;
import java.util.List;

/**
 * @author Kylin
 */
public interface AnimeVideoService {
    /**
     * Gets 8 anime videos.
     *
     * @param num the num
     * @return the anime videos
     * @throws VideoNotFoundException the video not found exception
     */
    List<AnimeVideo> getAnimeVideos(Integer num) throws VideoNotFoundException;

    /**
     * 获取新番时间表
     *
     * @return the anime refresh lists
     * @throws VideoNotFoundException the video not found exception
     */
    LinkedList<List<AnimeRefresh>> getAnimeRefreshLists() throws VideoNotFoundException;

    /**
     * 获取播放视频信息
     *
     * @param id animeVideoId
     * @return the anime play
     * @throws AnimeNotFoundException the anime not found exception
     * @throws VideoNotFoundException the video not found exception
     */
    AnimePlay getAnimePlay(Integer id) throws AnimeNotFoundException, VideoNotFoundException;

    /**
     * 查询视频源
     *
     * @param jwt the jwt
     * @param id  the id
     * @return the source
     * @throws VideoNotFoundException the video not found exception
     * @throws NotLoginException      the not login exception
     * @throws IllegalException       the illegal exception
     */
    List<AnimeSource> getSource(String jwt, Long id) throws VideoNotFoundException, NotLoginException, IllegalException;
}
